/// 活动数据模型
class ActivityModel {
  final String activityId;
  final String title;
  final String description;
  final String imageUrl;
  final String badgeImageUrl; // 勋章图片
  final DateTime createTime;
  final bool isActive; // 活动是否激活

  const ActivityModel({
    required this.activityId,
    required this.title,
    required this.description,
    required this.imageUrl,
    required this.badgeImageUrl,
    required this.createTime,
    required this.isActive,
  });

  /// 复制并修改模型
  ActivityModel copyWith({
    String? activityId,
    String? title,
    String? description,
    String? imageUrl,
    String? badgeImageUrl,
    DateTime? createTime,
    bool? isActive,
  }) {
    return ActivityModel(
      activityId: activityId ?? this.activityId,
      title: title ?? this.title,
      description: description ?? this.description,
      imageUrl: imageUrl ?? this.imageUrl,
      badgeImageUrl: badgeImageUrl ?? this.badgeImageUrl,
      createTime: createTime ?? this.createTime,
      isActive: isActive ?? this.isActive,
    );
  }
}

/// 活动弹幕数据模型
class ActivityBulletModel {
  final String bulletId;
  final String activityId;
  final String userId;
  final String content;
  final DateTime sendTime;

  const ActivityBulletModel({
    required this.bulletId,
    required this.activityId,
    required this.userId,
    required this.content,
    required this.sendTime,
  });

  /// 复制并修改模型
  ActivityBulletModel copyWith({
    String? bulletId,
    String? activityId,
    String? userId,
    String? content,
    DateTime? sendTime,
  }) {
    return ActivityBulletModel(
      bulletId: bulletId ?? this.bulletId,
      activityId: activityId ?? this.activityId,
      userId: userId ?? this.userId,
      content: content ?? this.content,
      sendTime: sendTime ?? this.sendTime,
    );
  }
}

/// 用户活动分享数据模型
class ActivityShareModel {
  final String shareId;
  final String activityId;
  final String userId;
  final String imageUrl;
  final DateTime shareTime;
  final bool hasReceivedBadge; // 是否已获得勋章

  const ActivityShareModel({
    required this.shareId,
    required this.activityId,
    required this.userId,
    required this.imageUrl,
    required this.shareTime,
    required this.hasReceivedBadge,
  });

  /// 复制并修改模型
  ActivityShareModel copyWith({
    String? shareId,
    String? activityId,
    String? userId,
    String? imageUrl,
    DateTime? shareTime,
    bool? hasReceivedBadge,
  }) {
    return ActivityShareModel(
      shareId: shareId ?? this.shareId,
      activityId: activityId ?? this.activityId,
      userId: userId ?? this.userId,
      imageUrl: imageUrl ?? this.imageUrl,
      shareTime: shareTime ?? this.shareTime,
      hasReceivedBadge: hasReceivedBadge ?? this.hasReceivedBadge,
    );
  }
}
